// 属性
import service from './prototypes/service.js'
// 组件
import InputUpload from './components/input-upload/input-upload';
import NavigationBar from './components/navigation-bar/navigation-bar';
import NoData from './components/no-data/no-data';
import MintUiRefresh from './components/mint-ui-refresh/mint-ui-refresh';
import MuiRefresh from './components/mui-refresh/mui-refresh';
import Refresh from './components/refresh/refresh';
// 指令
import focus from './directives/focus';
// 过滤器
import imageFormat from './filters/imageFormat';
import dateFormat from './filters/dateFormat';
// 混入

export default {
    install(Vue, option) {
        // 注册属性
        Vue.prototype.$ = service;
        
        // 注册组件
        Vue.component('input-upload', InputUpload);
        Vue.component('navigation-bar', NavigationBar);
        Vue.component('no-data', NoData);
        Vue.component('mint-ui-refresh', MintUiRefresh);
        Vue.component('mui-refresh', MuiRefresh);
        Vue.component('refresh', Refresh);

        // 注册指令
        Vue.directive('focus',focus);

        // 注册过滤器
        Vue.filter('imageUrl',imageFormat.url);
        Vue.filter('imagePath',imageFormat.path);
        Vue.filter('dateFormat',dateFormat);

        // 注册混入
        // Vue.mixin({})
    }
}